<template >
    <div>

        <div>
            <!-- 编辑 -->
            <input type="text" v-model='infoText'>
        </div>
    </div>

</template>
<script>
export default {
    name: "Cart1",
    props: {
        info: {
            type: String,
            default: `这是默认数据`
        }
    },
    created() {
        this.infoText = this.info;
    },
    data() {
        return {
            infoText: ``
        };
    },
    watch: {
        infoText: function(newVal, oldVal) {
            console.log(newVal);
            this.$emit("changeText",newVal)
        }
    },
    methods: {
       
    }
};
</script>
